import java.util.Scanner;

/**
 * @author Lxh
 * @version 2022.1.2
 * @date 2022/4/30 9:58
 */


public class TestDemo2 {
/*    public static int Fibonacci(int n) {
        if(n==1 || n==2) {
            return 1;
        }
        int tmp = Fibonacci(n-1)+Fibonacci(n-2);
        return tmp;
    }
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        System.out.println(Fibonacci(n));
    }*/
/*    public static int sumNum(int n){
        if(n<10)
        {
            return n;
        }else{
            return n % 10 + sumNum(n / 10);
        }

    }
public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int n = scanner.nextInt();
    System.out.println(sumNum(n));
}*/
/*    public static void print(int n){

        if(n<10){
            System.out.println(n);
        }else{
            print(n/10);
            System.out.println(n%10);
        }
    }
public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        print(n);
}*/
/*    public static int sum(int n){
        int sum = 0;
        for (int i = 1; i <= n ; i++) {
            sum += i;
        }
        return sum;
    }
public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int n = scanner.nextInt();
    System.out.println(sum(n));
}*/
    public static int  factorial(int n){

            return n>=1?n*factorial(n-1):1;

    }
public static void main(String[] args) {
    Scanner scanner = new Scanner(System.in);
    int n = scanner.nextInt();
    System.out.println(factorial(n));
}
}
